Optimal. Leaf size=31 \[ b \sin (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \cos (a) \text{Si}\left (\frac{b}{x}\right )+x \cos \left (a+\frac{b}{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0723927, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {3362, 3297, 3303, 3299, 3302} \[ b \sin (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \cos (a) \text{Si}\left (\frac{b}{x}\right )+x \cos \left (a+\frac{b}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3362
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \cos \left (a+\frac{b}{x}\right ) \, dx &=-\operatorname{Subst}\left (\int \frac{\cos (a+b x)}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=x \cos \left (a+\frac{b}{x}\right )+b \operatorname{Subst}\left (\int \frac{\sin (a+b x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=x \cos \left (a+\frac{b}{x}\right )+(b \cos (a)) \operatorname{Subst}\left (\int \frac{\sin (b x)}{x} \, dx,x,\frac{1}{x}\right )+(b \sin (a)) \operatorname{Subst}\left (\int \frac{\cos (b x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=x \cos \left (a+\frac{b}{x}\right )+b \text{Ci}\left (\frac{b}{x}\right ) \sin (a)+b \cos (a) \text{Si}\left (\frac{b}{x}\right )\\ \end{align*}
Mathematica [A] time = 0.030921, size = 31, normalized size = 1. \[ b \sin (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \cos (a) \text{Si}\left (\frac{b}{x}\right )+x \cos \left (a+\frac{b}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 39, normalized size = 1.3 \begin{align*} -b \left ( -{\frac{x}{b}\cos \left ( a+{\frac{b}{x}} \right ) }-{\it Si} \left ({\frac{b}{x}} \right ) \cos \left ( a \right ) -{\it Ci} \left ({\frac{b}{x}} \right ) \sin \left ( a \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.28664, size = 77, normalized size = 2.48 \begin{align*} \frac{1}{2} \,{\left ({\left (-i \,{\rm Ei}\left (\frac{i \, b}{x}\right ) + i \,{\rm Ei}\left (-\frac{i \, b}{x}\right )\right )} \cos \left (a\right ) +{\left ({\rm Ei}\left (\frac{i \, b}{x}\right ) +{\rm Ei}\left (-\frac{i \, b}{x}\right )\right )} \sin \left (a\right )\right )} b + x \cos \left (\frac{a x + b}{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.59511, size = 144, normalized size = 4.65 \begin{align*} b \cos \left (a\right ) \operatorname{Si}\left (\frac{b}{x}\right ) + x \cos \left (\frac{a x + b}{x}\right ) + \frac{1}{2} \,{\left (b \operatorname{Ci}\left (\frac{b}{x}\right ) + b \operatorname{Ci}\left (-\frac{b}{x}\right )\right )} \sin \left (a\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos{\left (a + \frac{b}{x} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (a + \frac{b}{x}\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]